import { Modal, message } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import React from 'react';
const { confirm } = Modal;




const App = (props) => {
    const showDeleteConfirm = () => {
        confirm({
            title: `你确定删除：${props.props[0]} `,
            icon: <ExclamationCircleOutlined />,
            content: '删除后不可恢复！',
            okText: '确定',
            okType: 'danger',
            cancelText: '取消',

            onOk() {
                message.success('删除成功');
                console.log('OK');
            },

            onCancel() {
                console.log('Cancel');
            },
        });
    };

    return (
        <>
            <span style={{ color: '#f81d22' }} onClick={showDeleteConfirm}>
                删除
            </span>
        </>
    );
};

export default App;